import React, { Component } from 'react';
import { StyleSheet, Text, View} from 'react-native';
import { Slider } from 'iftide';

export default class Basic extends Component { 
    itemClick(id) {
        alert(id);
    } 

    render() {
      let data = [
          { img: require('./1.png'), id: 1 },
          { img: {uri: 'https://getmdl.io/assets/demos/image_card.jpg'}, id: 2 },
          { img: require('./3.png'), id: 3 },
          { img: require('./4.png'), id: 4 },
          { img: require('./5.png'), id: 5 }
      ];

      return (
       
          <View > 
            <Text>实例1-图片轮播</Text>
            <Slider
                data={data}
				pagination={true}
				duration={3000}
				loop={true}
				autoPlay={false}
				clickFunc={this.itemClick}
                defaultImg={require('./default.png')}
            />
           
        </View>  
      );
  }
}


   